package behavioralPattern.strategy.example02;

import java.util.List;

public class Client {
    public static void main(String[] args) {
        List<Receipt> receiptList = ReceiptBuilder.getReceiptList();

        for (Receipt receipt : receiptList) {
            if ("MT1101".equals(receipt.getType())){
                System.out.println("A");
                System.out.println("解析回执内容");
                System.out.println("执行业务逻辑 === A");
            } else if ("MT2101".equals(receipt.getType())) {
                System.out.println("B");
                System.out.println("解析回执内容");
                System.out.println("执行业务逻辑 === B");
            } else if ("MT4101".equals(receipt.getType())) {
                System.out.println("C");
                System.out.println("解析回执内容");
                System.out.println("执行业务逻辑 === C");
            } else if ("MT8104".equals(receipt.getType())) {
                System.out.println("D");
                System.out.println("解析回执内容");
                System.out.println("执行业务逻辑 === D");
            }else {
                System.out.println("bug yellow!");
            }
        }
    }
}
